<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>图书类型</title>
</head>
<body>
	<div class="container">
  		<div class="tgroup">
	        <div class="form form-inline tip">
	        	<label>查询图书类型</label>
	            <input class="form-control" type="text" name="" id="name" placeholder="名称">
	            <button class="btn btn-primary">查询</button>
	        </div>
	        <div class="form form-inline tip">
	        	<label>添加图书类型</label>
	            <input class="form-control" type="text" name="" id="name" placeholder="名称">
	            <button class="btn btn-primary" id="addType">添加</button>
	        </div>
   		</div>
	    <table class="layui-table" id="booktypet" lay-filter="booktypet">

   		</table>
	</div>
</body>
</html>
<script type="text/javascript">
    layui.use('table', function() {
        var table = layui.table;
        table.render({
            elem: '#booktypet',
            url:'booktypet.json',
            cols: [[
                {field:'type',  title: '出版社'},
                {field:'time',  title: '添加时间', },
                {fixed: 'right',  align:'center', toolbar: '#barDemo',  title: '操作'}
            ]]


        });
    });
</script>
<script type="text/html" id="barDemo">
    <!-- <a class="layui-btn layui-btn-xs" lay-event="detail">查看</a> -->
    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
    <!-- <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a> -->

</script>
<style type="text/css">
	.tip{
		margin-top: 10px;
		margin-bottom: 10px;
	}
</style>